{include file="public/header" /}
<body class="bg-white">
    <header class="all-header">
        <p class="all-header-item">
            <i class="layui-icon layui-icon-left" onclick="window.history.back(-1)"></i>
        </p>
        <p class="all-header-item">提交案件</p>
    </header>
    <form method="post" id="from">
        <div class="flex-box-input bg-white margin-top border-bottom1">
            <label class="fbi-item" for="yname">当 事 人：</label>
            <input class="fbi-item" type="text" name="yname" id="yname" placeholder="姓名或者公司名称">
        </div>
        <div class="flex-box-input bg-white border-bottom1">
            <label class="fbi-item" for="bname">涉案金额：</label>
            <input class="fbi-item" type="text" name="money" id="bname" placeholder="请输入涉嫌金额">万
        </div>
        
        <div class="flex-box-input">
            <span class="fbi-item">案件简介：</span>
        </div>
        <div class="flex-box-input layui-bg-gray">
                <textarea class="layui-bg-gray subdetail" name="describe" id="casedetail" placeholder="请输入您的案件介绍，如案件经过、证据情况，以便我们更好的为您服务"></textarea>
        </div>
       <!-- <div class="flex-box-input bg-white border-bottom1">
            <span>上传文件：</span>
            <p class="subbtn">点击上传</p>
        </div>-->
        <div class="layui-form-item">
            <!--<label class="layui-form-label upfile">上传文件</label>-->
                <div class="line">
                    <input type="text" name="thumb" placeholder="文件大小不超过5M！" class="layui-input thumb">
               &nbsp; <button type="button" onclick="GetUploadify(12,'articles');" class="layui-btn bg-yellow">上传文件</button>
                </div>
        </div>
        <button class="shop-btn bg-yellow" type="submit" class="order-btn">提交案件</button>
    </form>

    <div class="attention bg-white">
        <p>推荐上传资料清单</p>
        <p>未诉：相关合同，协议等材料</p>
        <p>一审：起诉状、或者答辩状，提交给法院的证明资料</p>
        <p>二审：一审判决书及上诉状</p>
    </div>

</body>

<script type="text/javascript">
    layui.use(['form'], function () {
        var form = layui.form;
        $("#from").submit(function (e) {
            e.preventDefault(); //阻止get提交
            var list = $(this).serialize();
            $.post("{:url('submit_case/add')}",list,function (ret) {
                if(ret.code == 1){
                    layer.msg(ret.msg)
                    setTimeout(function () {
                        location.reload();
                    },2000);
                }else{
                    layer.msg(ret.msg)
                }
            })
        });
        form.render();
    });
    //返回路径插入到指定元素
    function upload_callback(url)
    {
        $('input[name=thumb]').val(url);
    }
</script>

</html>